<template>
  <view class="body">
    <up-loading-icon text="" size="34" color="#00D1B6" />
  </view>
</template>
<script setup lang="ts">
import { onLoad } from '@dcloudio/uni-app'
import store from '@/store'
onLoad(() => {
  store.dispatch('setUserInfo')
})
</script>

<style lang="scss" scoped>
/* 圆形旋转动画 */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.body {
  position: relative;
  height: 100vh;
  background: #fff;
}

::v-deep .u-loading-icon {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.content {
  position: relative;
  top: calc(50% - 200rpx);
  height: 200rpx;

  .logo {
    position: absolute;
    top: 24rpx;
    left: calc(50% - 32rpx);
    width: 64rpx;
    height: 64rpx;
  }

  .circle {
    position: relative;
    left: calc(50% - 56rpx);
    width: 112rpx;
    height: 112rpx;
    border: 2rpx solid #e5e6eb;
    border-radius: 50%;
    animation: rotate 2s linear infinite;
  }

  .dot {
    position: absolute;
    top: -4rpx; /* 圆点位于圆圈上方，稍微离开圆圈一些 */
    left: 50%;
    width: 6rpx;
    height: 6rpx;
    background-color: #3bb2db;
    border-radius: 50%;
    transform: translateX(-50%); /* 使圆点水平居中 */
  }

  .text {
    margin-top: 34rpx;
    font-size: 30rpx;
    font-weight: 600;
    color: #222;
    text-align: center;
  }
}
</style>
